1. The Field of the Invention
The present invention relates to the field of computing, and, more particularly, to computer operating system architecture. Still more particularly, the present invention relates to software, methods and systems that provide access to computer system resources for device drivers. The invention has applications in the fields of electronics and computer science.
2. Background
A device driver is software used to enable the exchange of data between a computer system (or xe2x80x9cplatformxe2x80x9d) and a peripheral device that is coupled with the computer system. Usually, the peripheral device functions to provide data input and/or output (xe2x80x9cI/Oxe2x80x9d) to the computer system. Examples of peripheral devices include keyboards, printers, scanners, network interface and graphics cards, modems, and monitors. In general, device drivers process data sent to or retrieved from the peripheral device by the computer system so that the data is transferred in a format suitable for processing by the peripheral device or computer system.
The intimate association between the device driver and the hardware and software of the both the peripheral device and computer system to which the device is coupled has required that device drivers be written in a highly platform-dependent manner. For example, device drivers generally must obtain memory space when called to perform their function. Typically, this requires the allocation of memory space that must be described by the driver. The driver must therefore have specific knowledge about the platform in order to make such a request. Thus, the same peripheral device, e.g., a printer, will require different version of device (printer) driver software for each platform.
The platform dependence of driver software thus increases the costs of developing platforms and peripherals, as manufactures of peripherals and computer operating systems must provide new versions and updates of driver software for new peripherals, new software platforms, and new operating system releases. Platform-dependent driver technology also increases the cost of maintaining computer systems, especially diverse computer systems deployed over networks, as system managers must obtain and install new and updated device drivers to enable user access to peripheral devices.
Therefore, it would be advantageous to provide device drivers that are platform-independent, i.e., drivers that do not require information about specific platforms as a prerequisite to operation. Such platform-independent device drivers would be capable of running on any platform, thus greatly reducing the costs and frustrations associated with device driver management.
The present invention meets these demands by providing a platform-independent device driver. As discussed below, the platform-independence of the device driver of the invention results from the use of abstract memory objects that allow for the description of memory without actual resource allocation by the computer system. By providing a general, platform-independent means and method for device drivers to request memory, the necessity for the inclusion of highly complex, platform-specific code to enable drivers to request memory is eliminated. Moreover, the present invention allows for such allocation in a secure fashion so that data security cannot be breached by rogue drivers.
According to one aspect, the present invention provides a computer-implemented method for allocating memory in which a bus manager is provided and configured to process memory allocation requests from a platform-independent device driver. The bus manager is an instantiation of an xe2x80x9couterxe2x80x9d object class of bus managers. A platform-independent device driver is configured to generate memory allocation requests in terms of an abstract memory address space used by the bus manager. Such a request is generated and the identity if the device driver is determined. In addition, an xe2x80x9cinnerxe2x80x9d class representation of the bus manager is generated. The inner class representation is configured to provide the same memory allocation request processing methods as the outer class bus manager. The request is processed and real memory is allocated to the device driver.
In one embodiment, the verification comprises locating the device driver in a system database that associates the device driver with the bus manager. In another embodiment, the inner class is generated and the verification is performed when a system loader loads the driver. In still another embodiment, a plurality of such inner class bus managers are provided for a plurality of device drivers. The inner class bus mangers are provided unique assignments to the device drivers to create a one-to-one correspondence between the device drivers and inner class bus managers. Yet, because the inner class bus managers provide the same methods for processing memory allocation requests as the outer class bus manager, each device driver xe2x80x9cthinksxe2x80x9d it is communicating with the outer class bus manager. Thus, special coding is not required beyond a knowledge of the outer class bus manager.
In another aspect, the present invention provides an apparatus for platform-independent, secure device driver memory allocation. In one embodiment, a bus manager is configured to process requests for allocation of said computer memory from a device driver. A platformindependent device driver is provided as well as d for checking the identity of the device driver and for allocating memory in response to a request from the platform-independent device driver.
In still other aspects, computer-readable program code devices and computer data on a carrier wave that are configured to provide secure, platform-independent allocation of memory to a device driver are provided. In one embodiment, the program code devices and data are configured to provide a bus manager that is configure to respond to memory allocation requests from a platform-independent device driver. The code devices and data are further configured to generate a request for memory allocation and verify the identity of the device driver.
These and other aspects and advantages of the present invention will become more apparent when the Description below is read in conjunction with the accompanying Drawings.